// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

.navbar-mobile-item {
  @_top: navbar-mobile-item;

  flex: none;
  display: flex;
  flex-direction: column;

  &--user {
    flex-direction: row;
    align-items: center;
    background-color: @osu-colour-b4;
  }

  &__icon {
    width: @navbar-mobile--content-height;
    margin-right: 10px;
    text-align: center;

    // state changes at bottom
    &--closed {
      display: inline-block;

      .@{_top}__main.js-click-menu--active > & {
        display: none;
      }
    }

    &--opened {
      display: none;

      .@{_top}__main.js-click-menu--active > & {
        display: inline-block;
      }
    }
  }

  &__locale-flag {
    display: inline-block;
    margin-right: 5px;
  }

  &__main {
    @_colour-base: hsla(var(--hsl-c1), 50%);
    @_colour-hover: @osu-colour-c1;

    .reset-input();
    .link-plain();
    color: @_colour-base;
    display: flex;
    align-items: center;
    padding: 10px @navbar-padding-horizontal;

    &:focus {
      color: @_colour-base;
    }

    &:hover,
    &:active {
      color: @_colour-hover;
    }

    &.js-click-menu--active {
      color: @_colour-hover;
    }
  }

  &__submenu {
    display: none;
    list-style: none;
    padding: 0;

    &.js-click-menu--active {
      display: block;
    }
  }

  &__submenu-item {
    .link-plain();
    display: flex;
    align-items: center;
    padding: 5px @navbar-padding-horizontal 5px
      (@navbar-mobile--content-height + 30px);
    color: @osu-colour-c2;

    &:hover {
      background-color: @osu-colour-b3;
    }

    .link-hover({
      color: @osu-colour-c2;
    });
  }
}
